Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the git configuration procedure to properly enable pushing commits by configuring gh first and using gh auth setup-git instead of manually setting git user credentials. The changes address the issue where the previous procedure configured git but didn't allow actual push operations.
- Simplifies the configuration process by leveraging
gh auth setup-gitinstead of manual git config commands - Moves the tip about finding bot user IDs to appear before the configuration section for better readability
- Updates the procedure title to reflect that it now configures both
ghandgitCLI tools
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
This pull request has been marked stale because it has been open for 180 days with no activity. Please close this pull request if it is no longer needed. If this pull request is still relevant and you would like it to remain open, simply update it within the next 60 days. |
| echo "${{ steps.app-token.outputs.token }}" | gh auth login --with-token | ||
| gh auth setup-git |
There was a problem hiding this comment.
| echo "${{ steps.app-token.outputs.token }}" | gh auth login --with-token | |
| gh auth setup-git | |
| gh auth setup-git | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} |
I don't think the login step is necessary. How about this? I think GH_TOKEN will need to be set on the git push step below as well.
There was a problem hiding this comment.
That is necessary to setup both git and gh.
Configure gh/git CLI for an app's bot user
The current procedure for configuring
gitdoes not allow it to push commitsbesides the current repository, even if the app token may have access to other
repositories. It also does not allow
gitto clone such a repository.This new procedure configures
ghfirst and then callsgh auth setup-gitto configure
gitso it will work for any repository that the token has access to.